import { createRouter, createWebHistory } from 'vue-router'

import showMain from "@/views/main/main.vue";
import Navbar from "@/components/Navbar.vue";
import showLogin from "@/views/login/showlogin.vue";
import showRegis from "@/views/regis/showregis.vue";
import Feedback from "@/views/Feedback/Feedback.vue";
import QA from "@/views/QA/QA.vue";
import forgotPassword from "@/views/forgot-password/forgot-password.vue";
import ForgotPassword from "@/views/forgot-password/forgot-password.vue";
import query_project from "@/views/query/query_project.vue";
import query_people from "@/views/query/query_people.vue";
import query from "@/views/query/query.vue";
import res from "@/views/query/res.vue";

import commentSection from "@/views/E_Shopping_Mall/points-mall-two/comments-section.vue";
import content from "@/views/E_Shopping_Mall/points-mall-two/content.vue";
import recommendedArea from "@/views/E_Shopping_Mall/points-mall-two/Recommended-area.vue";

import PostList from "@/views/community/PostList.vue";
import Account  from "@/views/Account/Account.vue";
import E_Shopping_Mall from "@/views/E_Shopping_Mall/E_Shopping_Mall.vue";
import test from "@/views/test/test.vue"

import feedback_knowledge from '@/views/Feedback/feedback_knowledge/feedback_knowledge.vue';
import feedback_web from '@/views/Feedback/feedback_web/feedback_web.vue';

import addPost from '@/views/community/Add.vue'

import tmp from '@/views/tmp/tmp.vue'
import ok from '@/views/tmp/ok.vue'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),

  routes: [
    {
      path: "/account",
      component: Account,
      meta:{
        isPermission: 0,
      }
    },
    {
      path: '/',
      name: 'index',
      component: Navbar,
      children: [

        {
          // 默认路径
          path: '',
         // name: "首页",
          component:  showMain,
          meta: {
            isPermission: 0,
          },
        },
        {
          path: "/QA",
         // name: "智能问答",
          component: QA,
          meta: {
            isPermission: 0,
          },
        },
        {
          path: "/Feedback",
       //   name: "反馈界面",
          component: Feedback,
          meta: {
            isPermission: 0,
          },
        },
        {
          path: "/overview",
          //name: "非遗概览",
          component: Navbar,
          meta: {
            isPermission: 0,
          },
        },
        {
          path: "/community",
          //name: "交流社区",
          component: PostList,
          meta: {
            isPermission: 0,
          },
        },
        {
          path: '/login',
          component: showLogin,
          /* component: Navbar,*/
          //name: "登录",
          meta: {
            isPermission: 0,
          },
        },
        {
          path: "/register",
          component: showRegis,
          meta: {
            isPermission: 0,
          }
        },
        {
          path: "/forgot-password",
          component: ForgotPassword,
          meta:{
            isPermission: 0,
          }
        },
        {
          path: "/query_project",
          component: query_project,
          meta:{
            isPermission: 0,
          }
        },
        {
          path: "/query_people",
          component: query_people,
          meta:{
            isPermission: 0,
          }
        },
        {
          path: "/query",
          component: query,
          meta:{
            isPermission: 0,
          }
        },
        {
          path: "/res",
          component: res,
          meta:{
            isPermission: 0,
          }
        },

        {
          path: "/E_Shopping_Mall",
          component: E_Shopping_Mall,
          meta:{
            isPermission: 0,
          }
        },
        {
          path: "/test",
          component:test,
          meta:{
            isPermission: 0,
          }
        },
        {
          path: "/comments-section",
          component: commentSection,
          meta:{
            isPermission: 0,
          }
        },
        {
          path: "/content",
          component: content,
          meta:{
            isPermission: 0,
          }
        },
        {
          path: "/Recommended-area",
          component: recommendedArea,
          meta:{
            isPermission: 0,
          }
        },
        {
          //问题反馈
          path:"/feedback_web",
          component:feedback_web,
          meta:{
            isPermission: 0,
          }
        },
        {//补充
          path:"/feedback_knowledge",
          component:feedback_knowledge,
          meta:{
            isPermission:0,
          }
        },
        {//补充
          path:"/addpost",
          component:addPost,
          meta:{
            isPermission:0,
          }
        },
        {//补充
          path:"/tmp",
          component:tmp,
          meta:{
            isPermission:0,
          }
        },
        {//补充
          path:"/ok",
          component:ok,
          meta:{
            isPermission:0,
          }
        },
      ]
    }

  ]
})

export default router
